﻿CREATE TABLE [dbo].[IndexColumn] (
    [IndexID]   INT NOT NULL,
    [ColumnID]  INT NOT NULL,
    [IsInclude] BIT NULL,
    CONSTRAINT [PK_IndexColumn] PRIMARY KEY CLUSTERED ([IndexID] ASC, [ColumnID] ASC),
    CONSTRAINT [FK_IndexColumn_Column] FOREIGN KEY ([ColumnID]) REFERENCES [dbo].[Column] ([ColumnId]),
    CONSTRAINT [FK_IndexColumn_Index] FOREIGN KEY ([IndexID]) REFERENCES [dbo].[Index] ([IndexID])
);



